<template>
  <div class="external" v-loading="loading">
    <div class="first">
      <div class="first-top">
        <div class="top-list" v-for="(item, index) in 3" :key="index">
          <div class="list-title">
            {{ index == 0 ? "姓名" : index == 1 ? "证件号" : "商户号" }}
          </div>
          <div class="list-input">
            <el-input
              v-if="index == 0"
              v-model="firstName"
              clearable
              placeholder="请输入姓名"
            ></el-input>
            <el-input
              v-if="index == 1"
              v-model="firstCertificate"
              clearable
              placeholder="请输入证件号"
            ></el-input>
            <el-input
              v-if="index == 2"
              v-model="firstCommercial"
              clearable
              placeholder="请输入商户号"
            ></el-input>
          </div>
        </div>

        <div class="top-button">
          <div
            class="button"
            v-for="(item, index) in 2"
            :key="index"
            @click="walletFunction(index)"
          >
            {{ index == 0 ? "搜索" : "重置" }}
          </div>
        </div>
      </div>

      <div class="first-center">
        <div
          class="center"
          v-for="(item, index) in 1"
          :key="index"
          :style="{
            background: index == 1 ? '#0AC1C7' : index == 2 ? '#A9A9A9' : '',
          }"
          @click="walletMet(index)"
        >
          <img
            class="center-img"
            :src="
              index == 0
                ? require('../../assets/index/icon-7.png')
                : index == 1
                ? require('../../assets/index/icon-8.png')
                : require('../../assets/index/icon-9.png')
            "
            alt=""
          />
          <div class="center-title">
            {{ index == 0 ? "新增" : index == 1 ? "导出" : "删除" }}
          </div>
        </div>
      </div>

      <div class="first-bottom">
        <img class="bottom-img" src="../../assets/index/icon-10.png" alt="" />
        <div class="bottom-title">已选择{{ multipleSelectionTotal }}项</div>
        <div class="bottom-title">
          服务调用总计：{{ multipleSelectionPrice }}元
        </div>
        <div
          class="bottom-title"
          style="color: #2588fa; text-decoration: underline; cursor: pointer"
          @click.stop="emptyStop"
        >
          清空
        </div>
      </div>
    </div>

    <div class="second">
      <div class="second-table">
        <el-table
          ref="multipleTable"
          :data="tableData"
          tooltip-effect="dark"
          style="width: 100%"
          @selection-change="handleSelectionChange"
          :header-cell-style="{
            color: '#949494',
            backgroundColor: '#F9F9F9',
          }"
          @sort-change="sortChange"
        >
          <!-- 自定义暂无数据 -->
          <template slot="empty">
            <div class="empty-block">
              <img
                class="empty-block-img"
                src="../../assets/common/common-empty.png"
              />
              <div class="empty-block-text">暂无数据～</div>
            </div>
          </template>
          <el-table-column
            type="selection"
            width="100"
            align="center"
          ></el-table-column>
          <el-table-column prop="id" label="钱包ID" width="110" align="center">
          </el-table-column>
          <el-table-column prop="name" label="姓名" width="110" align="center">
          </el-table-column>
          <el-table-column
            prop="certNo"
            label="证件号"
            width="200"
            align="center"
          >
          </el-table-column>
          <el-table-column prop="phone" label="电话" width="200" align="center">
          </el-table-column>
          <el-table-column
            prop="merchantNo"
            label="商户号"
            width="180"
            align="center"
          >
          </el-table-column>
          <el-table-column prop="" label="余额" width="200" align="center">
            <template slot-scope="scope"> ￥{{ scope.row.money }} </template>
          </el-table-column>
          <el-table-column
            prop="createTime"
            label="创建时间"
            sortable
            width="300"
            align="center"
          >
          </el-table-column>
          <el-table-column prop="" label="操作" width="500" align="center">
            <template slot-scope="scope">
              <div class="operation">
                <div
                  class="operation-list"
                  @click="walletOperation(0, scope.row)"
                >
                  身份证
                </div>
                <div
                  v-if="wallet0 == true"
                  class="operation-list"
                  style="color: #1dc225"
                  @click="walletOperation(1, scope.row)"
                >
                  转账
                </div>
                <div
                  class="operation-list"
                  style="color: #f58f17"
                  @click="walletOperation(2, scope.row)"
                >
                  银行卡
                </div>
                <div
                  class="operation-list"
                  style="color: #0ac1c7"
                  @click="walletOperation(3, scope.row)"
                >
                  明细
                </div>
                <div
                 v-if="wallet1 == true"
                  class="operation-list"
                  style="color: #0ac1c7"
                  @click="walletOperation(4, scope.row)"
                >
                  转平台
                </div>
                <div
                 v-if="wallet2 == true"
                  class="operation-list"
                  style="color: #0ac1c7"
                  @click="walletOperation(5, scope.row)"
                >
                  转商户
                </div>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>

      <div class="second-pagination">
        <div class="pagination-left">共{{ totalNum }}条数据</div>

        <div class="pagination-right">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :page-sizes="[10, 30, 50, 100]"
            :page-size="10"
            layout="sizes, prev, pager, next, jumper"
            :total="totalNum"
          ></el-pagination>
        </div>
      </div>
    </div>

    <!--新增-->
    <div class="addtion">
      <el-dialog title="" :visible.sync="addtionDialogVisible" round>
        <div class="addtion-block">
          <div class="block-header">
            <div class="header-title">创建银盛个人钱包</div>

            <img
              @click="addtionClose"
              class="header-close"
              src="../../assets/index/icon-11.png"
              alt=""
            />
          </div>

          <div class="block-center">
            <div class="center-list" v-for="(item, index) in 3" :key="index">
              <div class="list-left">
                {{
                  index == 0
                    ? "用户真实姓名"
                    : index == 1
                    ? "用户手机号"
                    : index == 2
                    ? "身份证号"
                    : "商户号"
                }}
              </div>
              <div class="list-right">
                <el-input
                  v-if="index == 0"
                  v-model="addtionName"
                  clearable
                  placeholder="请输入用户真实姓名"
                ></el-input>
                <el-input
                  v-if="index == 1"
                  v-model="addtionPhone"
                  clearable
                  placeholder="请输入用户手机号"
                ></el-input>
                <el-input
                  v-if="index == 2"
                  v-model="addtionCertificate"
                  clearable
                  placeholder="请输入身份证号"
                ></el-input>
                <el-input
                  v-if="index == 3"
                  v-model="addtionCommercial"
                  clearable
                  placeholder="请输入商户号"
                ></el-input>
              </div>
            </div>
          </div>

          <div class="block-bottom">
            <div
              class="bottom"
              v-for="(item, index) in 2"
              :key="index"
              @click="addtionFunction(index)"
            >
              {{ index == 0 ? "重置" : "提交" }}
            </div>
          </div>
        </div>
      </el-dialog>
    </div>

    <!--身份证-->
    <div class="identity">
      <el-dialog title="" :visible.sync="identityDialogVisible" round>
        <div
          class="identity-block"
          v-loading="loadings"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.1)"
        >
          <div class="block-header">
            <div class="header-title">身份证补充</div>

            <img
              @click="identityClose"
              class="header-close"
              src="../../assets/index/icon-11.png"
              alt=""
            />
          </div>

          <div class="block-center">
            <div class="center-list">
              <div class="list-left">身份证号码</div>
              <div class="list-right">
                <el-input
                  v-model="identityCard"
                  readonly
                  clearable
                  placeholder="请输入身份证号码"
                ></el-input>
              </div>
            </div>

            <div class="center-display">
              <div class="display-list">
                <el-image
                  class="list-download"
                  ref="download0"
                  :src="
                    identityFront == ''
                      ? require('../../assets/index/icon-12.png')
                      : identityFront
                  "
                  :preview-src-list="identitySrcList0"
                  :initial-index="identityFrontIndex"
                  @click="previewMet(identityFront, 0)"
                ></el-image>

                <el-upload
                  class="display-upload"
                  action="https://account.xmw1688.com/common/upload"
                  :on-success="handleSuccessList0"
                  :show-file-list="false"
                  ref="upload0"
                >
                  <div class="list-uploading">
                    <img
                      class="uploading-img"
                      src="../../assets/index/icon-7.png"
                      alt=""
                    />

                    <div class="uploading-title">上传身份证正面</div>
                  </div>
                </el-upload>
              </div>

              <div class="display-list">
                <el-image
                  class="list-download"
                  ref="download1"
                  :src="
                    identityBack == ''
                      ? require('../../assets/index/icon-12.png')
                      : identityBack
                  "
                  :preview-src-list="identitySrcList1"
                  :initial-index="identityBackIndex"
                  @click="previewMet(identityBack, 1)"
                ></el-image>

                <el-upload
                  class="display-upload"
                  action="https://account.xmw1688.com/common/upload"
                  :on-success="handleSuccessList1"
                  :show-file-list="false"
                  ref="upload1"
                >
                  <div class="list-uploading">
                    <img
                      class="uploading-img"
                      src="../../assets/index/icon-7.png"
                      alt=""
                    />

                    <div class="uploading-title">上传身份证反面</div>
                  </div>
                </el-upload>
              </div>
            </div>
          </div>

          <div class="block-bottom">
            <div
              class="bottom"
              v-for="(item, index) in 2"
              :key="index"
              @click="identityFunction(index)"
            >
              {{ index == 0 ? "重置" : "提交" }}
            </div>
          </div>
        </div>
      </el-dialog>
    </div>

    <!--转账-->
    <div class="transfer">
      <el-dialog title="" :visible.sync="transferDialogVisible" round>
        <div class="transfer-block">
          <div class="block-header">
            <div class="header-title">转账</div>
            <img
              @click="transferClose"
              class="header-close"
              src="../../assets/index/icon-11.png"
              alt=""
            />
          </div>

          <div class="block-center">
            <div class="center-list" v-for="(item, index) in 2" :key="index">
              <div class="list-left">
                {{
                  index == 0
                    ? "对方商户号"
                    : index == 1
                    ? "转账金额"
                    : index == 2
                    ? "支付方式"
                    : ""
                }}
              </div>
              <div class="list-right">
                <el-input
                  v-if="index == 0"
                  v-model="transferCart"
                  readonly
                  clearable
                  placeholder="请输入对方商户号"
                ></el-input>
                <el-input
                  v-if="index == 1"
                  v-model="transferPrice"
                  clearable
                  placeholder="请输入转账金额"
                ></el-input>

                <el-select
                  clearable
                  v-if="index == 2"
                  v-model="transferWay"
                  placeholder="请选择支付通道"
                >
                  <el-option
                    v-for="item in transferOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </div>
            </div>
          </div>

          <div class="block-bottom">
            <div
              class="bottom"
              v-for="(item, index) in 2"
              :key="index"
              @click="transferFunction(index)"
            >
              {{ index == 0 ? "重置" : "提交" }}
            </div>
          </div>

          <!-- <div class="block-checkout" @click="transferCheckoutMet">
            <img
              class="checkout-img"
              :src="
                transferCheckout == false
                  ? require('../../assets/index/icon-15.png')
                  : require('../../assets/index/icon-14.png')
              "
              alt=""
            />

            <div class="checkout-title">
              我已经阅读并同意
              <span
                style="
                  margin-left: 5px;
                  color: #2588fa;
                  text-decoration: underline;
                "
                @click.stop="zhifuStop"
                >支付协议</span
              >
            </div>
          </div> -->
        </div>
      </el-dialog>
    </div>

    <!--转账平台-->
    <div class="transfer">
      <el-dialog title="" :visible.sync="transferDialogVisible2" round>
        <div class="transfer-block">
          <div class="block-header">
            <div class="header-title">转平台</div>
            <img
              @click="transferClose2"
              class="header-close"
              src="../../assets/index/icon-11.png"
              alt=""
            />
          </div>

          <div class="block-center">
            <div class="center-list" v-for="(item, index) in 2" :key="index">
              <div class="list-left">
                {{ index == 0 ? "钱包商户号" : index == 1 ? "转账金额" : "" }}
              </div>
              <div class="list-right">
                <el-input
                  v-if="index == 0"
                  v-model="transferCart"
                  readonly
                  clearable
                  placeholder="请输入钱包商户号"
                ></el-input>
                <el-input
                  v-if="index == 1"
                  v-model="transferPrice"
                  clearable
                  placeholder="请输入转账金额"
                ></el-input>
              </div>
            </div>
          </div>

          <div class="block-bottom">
            <div
              class="bottom"
              v-for="(item, index) in 2"
              :key="index"
              @click="transferFunction2(index)"
            >
              {{ index == 0 ? "重置" : "提交" }}
            </div>
          </div>
        </div>
      </el-dialog>
    </div>

    <!--转账商户-->
    <div class="transfer">
      <el-dialog title="" :visible.sync="transferDialogVisible3" round>
        <div class="transfer-block">
          <div class="block-header">
            <div class="header-title">转商户</div>
            <img
              @click="transferClose3"
              class="header-close"
              src="../../assets/index/icon-11.png"
              alt=""
            />
          </div>

          <div class="block-center">
            <div class="center-list" v-for="(item, index) in 3" :key="index">
              <div class="list-left">
                {{
                  index == 0
                    ? "钱包商户号"
                    : index == 1
                    ? "转账金额"
                    : index == 2
                    ? "接受商户号"
                    : ""
                }}
              </div>
              <div class="list-right">
                <el-input
                  v-if="index == 0"
                  v-model="transferCart"
                  readonly
                  clearable
                  placeholder="请输入钱包商户号"
                ></el-input>
                <el-input
                  v-if="index == 1"
                  v-model="transferPrice"
                  clearable
                  placeholder="请输入转账金额"
                ></el-input>
                <el-input
                  v-if="index == 2"
                  v-model="transferMerchantNo"
                  clearable
                  placeholder="请输入接受商户号"
                ></el-input>
              </div>
            </div>
          </div>

          <div class="block-bottom">
            <div
              class="bottom"
              v-for="(item, index) in 2"
              :key="index"
              @click="transferFunctio3(index)"
            >
              {{ index == 0 ? "重置" : "提交" }}
            </div>
          </div>

          <!-- <div class="block-checkout" @click="transferCheckoutMet">
            <img
              class="checkout-img"
              :src="
                transferCheckout == false
                  ? require('../../assets/index/icon-15.png')
                  : require('../../assets/index/icon-14.png')
              "
              alt=""
            />

            <div class="checkout-title">
              我已经阅读并同意
              <span
                style="
                  margin-left: 5px;
                  color: #2588fa;
                  text-decoration: underline;
                "
                @click.stop="zhifuStop"
                >支付协议</span
              >
            </div>
          </div> -->
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import Bus from "../../utils/bus";

var throttle = require("../../utils/throttle");

import {
  getUserInfoWallet,
  postuploadWallet,
  posttransferInnerWallet,
  postcreateWalletWallet,
  postMerchantPlatorm,
  postMerchantTo,
} from "../../api/wallet";

export default {
  data() {
    return {
      ///-----------第一区域
      firstName: "",
      firstCertificate: "",
      firstCommercial: "",
      //------------第二区域
      tableData: [],
      multipleSelection: [],
      multipleSelectionTotal: 0,
      multipleSelectionPrice: 0,
      totalNum: 0,
      page: 1,
      limit: 10,
      //----------新增弹出框区域
      addtionDialogVisible: false,
      addtionName: "",
      addtionPhone: "",
      addtionCertificate: "",
      addtionCommercial: "",
      //---------身份证弹出框区域
      identityDialogVisible: false,
      identityCard: "",
      identityFront: "",
      identityFrontIndex: 0,
      identityBack: "",
      identityCommercial: "",
      identityBackIndex: 0,
      identitySrcList0: [],
      identitySrcList1: [],

      //---------转账
      transferDialogVisible: false,
      transferDialogVisible2: false,
      transferDialogVisible3: false,
      transferCart: "",
      transferPrice: "",
      transferWay: "",
      transferOptions: [],
      transferMerchantNo: "",
      transferCheckout: true,
      //-------
      loading: false,
      loadings: false,
      walletShow: false,
      //----------
      wallet0: false,
      wallet1: false,
      wallet2: false,
    };
  },
  created() {
    setTimeout(() => {
      this.walletShow = this.$store.state.pageFunctionShow;
    }, 1000);
    this.getUserInfoWalletMet();
    //--------获取权限
    this.pageFunMet();
  },
  methods: {
    pageFunMet() {
      let info = JSON.parse(localStorage.getItem("info"));
      let array = info.resource.split(";");
      array.forEach((item, index) => {
        if (item == "WALLET_TERRACE_TRANSFER_FUNC") {
          this.wallet0 = true;
        }

        if (item == "WALLET_TERRACE_PLATFORM_FUNC") {
          this.wallet1 = true;
        }

        if (item == "WALLET_TERRACE_TENANT_FUNC") {
          this.wallet2 = true;
        }
      });

      // console.log('this.$store.state.pageFunctionShow', this.$store.state.pageFunctionShow)
    },
    // 钱包
    getUserInfoWalletMet() {
      let params = {
        name: this.firstName,
        certNo: this.firstCertificate,
        merchantNo: this.firstCommercial,
        type: 0, // 外部 0  内部 1
        pageNo: this.page,
        pageSize: this.limit,
      };

      getUserInfoWallet(params).then((res) => {
        if (res.resultStatus == true) {
          this.tableData = res.resultData.list;
          this.totalNum = res.resultData.totalNum;
          this.loading = false;
        }
      });
    },

    walletFunction(index) {
      this.loading = true;
      if (index == 0) {
      } else {
        this.firstName = "";
        this.firstCertificate = "";
        this.firstCommercial = "";
        this.multipleSelectionTotal = 0;
      }

      this.getUserInfoWalletMet();
    },
    // 表格区域点击选中 勾选对应的
    handleSelectionChange(val) {
      let price = 0;

      val.forEach((item, index) => {
        price = Number(price) + Number(item.money);
      });

      this.multipleSelectionTotal = val.length;
      this.multipleSelectionPrice = price;
      this.multipleSelection = val;
    },
    // 点击监听排序
    sortChange(e) {},
    // 新增
    walletMet(index) {
      if (this.walletShow == false) {
        this.$message.error("暂无权限!");
        return;
      }

      if (index == 0) {
        this.addtionName = "";
        this.addtionPhone = "";
        this.addtionCertificate = "";

        this.addtionDialogVisible = true;
      }
    },

    walletOperation(index, item) {
      if (this.walletShow == false) {
        this.$message.error("暂无权限!");
        return;
      }

      if (index == 0) {
        this.identityCard = item.certNo;
        this.identityFront = item.frontPicUrl == null ? "" : item.frontPicUrl;
        this.identityBack = item.backPicUrl == null ? "" : item.backPicUrl;
        this.identityCommercial = item.merchantNo;
        this.identityDialogVisible = true;
      } else if (index == 1) {
        this.transferPrice = "";
        this.transferCart = item.merchantNo;

        this.transferDialogVisible = true;
      } else if (index == 2) {
        let obj = {
          merchantNo: item.merchantNo,
        };
        Bus.$emit("log", "externalWalletBank", obj);
      } else if (index == 3) {
        let obj = {
          merchantNo: item.merchantNo,
        };
        Bus.$emit("log", "externalWalletDetails", obj);
      } else if (index == 4) {
        this.transferPrice = "";
        this.transferCart = item.merchantNo;
        this.transferMerchantNo = "";
        this.transferDialogVisible2 = true;
      } else if (index == 5) {
        this.transferPrice = "";
        this.transferCart = item.merchantNo;

        this.transferDialogVisible3 = true;
      }
    },

    //---------新增
    addtionClose() {
      this.addtionDialogVisible = false;
    },

    addtionFunction(index) {
      if (index == 0) {
        this.addtionDialogVisible = false;
      } else {
        this.addwalletStop();
      }
    },

    // 新增钱包
    addwalletStop: throttle.throttle(function () {
      let params = {
        name: this.addtionName,
        mobile: this.addtionPhone,
        certNo: this.addtionCertificate,
      };

      postcreateWalletWallet(params).then((res) => {
        if (res.resultStatus == true) {
          this.$message.success("创建成功！");
          this.addtionDialogVisible = false;
          this.loading = true;
          this.getUserInfoWalletMet();
        }
      });
    }, 2000),

    //-------------身份证
    identityClose() {
      this.identityDialogVisible = false;
    },

    identityFunction(index) {
      if (index == 0) {
        this.identityDialogVisible = false;
      } else {
        this.loadings = true;

        let params = {
          merchantNo: this.identityCommercial,
          frontPicUrl: this.identityFront,
          backPicUrl: this.identityBack,
        };

        postuploadWallet(params).then((res) => {
          if (res.resultStatus == true) {
            this.loadings = false;
            this.$message.success("身份证补充成功！");

            this.identityDialogVisible = false;
            this.loading = true;
            this.getUserInfoWalletMet();
          }
        });
      }
    },

    //----------转账
    transferClose() {
      this.transferDialogVisible = false;
    },

    transferClose2() {
      this.transferDialogVisible2 = false;
    },

    transferClose3() {
      this.transferDialogVisible3 = false;
    },

    transferFunction(index) {
      if (index == 0) {
        this.transferDialogVisible = false;
      } else {
        if (this.transferCheckout == false) {
          this.$message.warning("请先勾选协议");

          return;
        }

        this.loadings = true;
        let params = {
          amount: this.transferPrice,
          payeeMerchantNo: this.transferCart,
        };

        posttransferInnerWallet(params).then((res) => {
          if (res.resultStatus == true) {
            this.loadings = false;
            this.$message.success("转账成功！");

            this.transferDialogVisible = false;
            this.loading = true;
            this.getUserInfoWalletMet();
          }
        });
      }

      this.transferDialogVisible = false;
    },
    transferFunction2(index) {
      this.loadings = true;
      let params = {
        amount: this.transferPrice,
        payerMerchantNo: this.transferCart,
      };

      postMerchantPlatorm(params).then((res) => {
        if (res.resultStatus == true) {
          this.loadings = false;
          this.$message.success("转账成功！");

          this.transferDialogVisible2 = false;
          this.loading = true;
          this.getUserInfoWalletMet();
        }
      });
    },
    transferFunctio3(index) {
      this.loadings = true;
      let params = {
        amount: this.transferPrice,
        payerMerchantNo: this.transferCart,
        srcMerchantNo: this.transferMerchantNo,
      };

      postMerchantTo(params).then((res) => {
        if (res.resultStatus == true) {
          this.loadings = false;
          this.$message.success("转账成功！");

          this.transferDialogVisible3 = false;
          this.loading = true;
          this.getUserInfoWalletMet();
        }
      });
    },
    transferCheckoutMet() {
      this.transferCheckout = !this.transferCheckout;
    },

    //----------------------------------------------------------
    // 上传成功
    handleSuccessList0(file, fileList) {
      this.$nextTick(() => {
        this.$refs.upload0.clearFiles();
      });

      this.identityFront = file.resultData;
    },
    handleSuccessList1(file, fileList) {
      this.$nextTick(() => {
        this.$refs.upload1.clearFiles();
      });
      this.identityBack = file.resultData;
    },
    //----预览
    previewMet(item, index) {
      if (index == 0) {
        if (item == "") {
          return;
        }

        this.identitySrcList0.push(item);
        this.$refs.download0.clickHandler();
      } else {
        if (item == "") {
          return;
        }
        this.identitySrcList1.push(item);
        this.$refs.download1.clickHandler();
      }
    },
    zhifuStop() {
      const url = "https://api.xmw1688.cn/payment.html";
      window.open(url, "_blank");
    },
    emptyStop() {
      this.multipleSelection = [];
      this.$refs.multipleTable.clearSelection();
      this.getUserInfoWalletMet();
    },
    //  查询当前页码多少条
    handleSizeChange(val) {
      this.limit = val;
      this.loading = true;
      this.getUserInfoWalletMet();
    },
    //  查询当前页
    handleCurrentChange(val) {
      this.page = val;
      this.loading = true;
      this.getUserInfoWalletMet();
    },
  },
};
</script>

<style lang="less" scoped>
.external {
  .first {
    .first-top {
      display: flex;
      align-items: center;
      .top-list {
        display: flex;
        align-items: center;
        margin-right: 12px;

        .list-title {
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 14px;
          color: #757575;
          margin-right: 12px;
        }

        .list-input {
          /deep/ .el-input__inner {
            width: 174px;
            height: 38px;
            background: #ffffff;
            border-radius: 4px;
          }
        }
      }

      .top-button {
        display: flex;
        align-items: center;

        .button {
          width: 66px;
          height: 38px;
          background: #2588fa;
          border-radius: 4px;
          display: flex;
          align-items: center;
          justify-content: center;

          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 14px;
          color: #ffffff;
          cursor: pointer;
          border: 1px solid #2588fa;
        }

        .button:last-child {
          background: #ffffff;
          color: #949494;
          margin-left: 12px;
          border: 1px solid #dedede;
        }
      }
    }

    .first-center {
      margin-top: 15px;
      display: flex;
      align-items: center;

      .center {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        padding: 0 14px;
        box-sizing: border-box;
        height: 38px;
        background: #2588fa;
        border-radius: 4px;
        cursor: pointer;

        .center-title {
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 14px;
          color: #ffffff;
        }

        .center-img {
          width: 12px;
          height: 12px;
          margin-right: 8px;
        }
      }
    }

    .first-bottom {
      margin-top: 16px;
      display: flex;
      align-items: center;
      height: 38px;
      background: #edf5ff;
      border-radius: 4px;
      border: 1px solid #aed4ff;
      padding: 0 16px;
      box-sizing: border-box;

      .bottom-img {
        width: 14px;
        height: 14px;
        margin-right: 11px;
      }

      .bottom-title {
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 14px;
        color: #292929;
        margin-right: 17px;
      }
    }
  }

  .second {
    margin-top: 16px;
    .second-table {
      /deep/ .el-table thead {
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 14px;
        color: #949494;
      }

      /deep/ .el-table tr {
        height: 46px;
      }

      /deep/ .el-table__empty-text {
        line-height: 0;
      }

      /deep/ .el-table .el-table__cell {
        padding: 0;
      }

      .empty-block {
        margin-top: 62px;
        padding-bottom: 40px;

        .empty-block-img {
          width: 130px;
          height: 130px;
          margin: 0 auto;
        }

        .empty-block-text {
          font-size: 12px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #999999;
          margin-top: 10px;
          height: 17px;
          line-height: 17px;
        }
      }

      .operation {
        display: flex;
        align-items: center;
        justify-content: center;

        .operation-list {
          font-size: 14px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #2588fa;
          text-decoration: underline;
          cursor: pointer;
          margin-right: 16px;
        }
      }
    }

    .second-pagination {
      height: 75px;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;

      .pagination-left {
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 15px;
        color: #949494;
      }

      .pagination-right {
        /deep/ .el-pagination .btn-prev {
          padding: 0;
          width: 30px;
          height: 30px;
          background: #f4f5f9;
          border-radius: 2px;
          border: 1px solid #d9d9d9;
          margin-right: 8px;
        }

        /deep/ .el-pagination .btn-next {
          padding: 0;
          width: 30px;
          height: 30px;
          background: #f4f5f9;
          border-radius: 2px;
          border: 1px solid #d9d9d9;
        }

        /deep/ .el-pager li {
          padding: 0;
          width: 30px;
          height: 30px;
          border-radius: 2px;
          background: #f4f5f9;
          border: 1px solid #d9d9d9;
          line-height: 30px;
          margin-right: 8px;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 15px;
          color: #949494;
        }

        /deep/ .el-pager li.active {
          background: #2588fa;
          color: #ffffff;
        }

        /deep/ .el-input--mini .el-input__inner {
          height: 30px;
          background: #f4f5f9;
        }

        /deep/ .el-input__inner {
          font-size: 14px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.65);
        }
      }
    }
  }

  .addtion {
    /deep/ .el-dialog {
      width: 456px;

      border-radius: 6px;
    }

    /deep/ .el-dialog__body {
      padding: 0;
    }

    .addtion-block {
      background: #ffffff;
      .block-header {
        height: 48px;
        border-radius: 10px 10px 0px 0px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: #f8f8f8;

        .header-title {
          font-family: PingFangSC, PingFang SC;
          font-weight: 600;
          font-size: 16px;
          color: #292929;
        }

        .header-close {
          position: absolute;
          right: 20px;
          width: 14px;
          height: 14px;
          cursor: pointer;
          margin-top: 5px;
        }
      }

      .block-center {
        margin-top: 20px;
        padding: 0 23px;
        box-sizing: border-box;

        .center-list {
          display: flex;
          align-items: center;
          height: 38px;
          margin-bottom: 12px;

          .list-left {
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 14px;
            color: #555555;
            width: 25%;
            text-align: right;
            margin-right: 2%;
          }

          .list-right {
            width: 83%;

            /deep/ .el-input__inner {
              width: 100%;
              height: 38px;
              background: #ffffff;
              border-radius: 4px;
            }
          }
        }
      }

      .block-bottom {
        padding: 0 23px 20px;
        box-sizing: border-box;
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        .bottom {
          cursor: pointer;
          width: 72px;
          height: 40px;
          background: #ffffff;
          border-radius: 4px;
          border: 1px solid #dedede;
          display: flex;
          justify-content: center;
          align-items: center;

          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 14px;
          color: #949494;
        }

        .bottom:last-child {
          background: #2588fa;
          color: #ffffff;
          margin-left: 12px;
          border: 1px solid #2588fa;
        }
      }
    }
  }

  .identity {
    /deep/ .el-dialog {
      width: 456px;
      // min-height: 300px;
      background: #ffffff;
      border-radius: 6px;
    }

    /deep/ .el-dialog__body {
      padding: 0;
    }

    .identity-block {
      background: #fff;

      .block-header {
        height: 48px;
        border-radius: 10px 10px 0px 0px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: #f8f8f8;

        .header-title {
          font-family: PingFangSC, PingFang SC;
          font-weight: 600;
          font-size: 16px;
          color: #292929;
        }

        .header-close {
          position: absolute;
          right: 20px;
          width: 14px;
          height: 14px;
          cursor: pointer;
          margin-top: 5px;
        }
      }

      .block-center {
        margin-top: 20px;
        padding: 0 23px;
        box-sizing: border-box;

        .center-list {
          display: flex;
          align-items: center;
          height: 38px;
          margin-bottom: 12px;

          .list-left {
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 14px;
            color: #555555;
            width: 20%;
            text-align: right;
            margin-right: 2%;
          }

          .list-right {
            width: 78%;

            /deep/ .el-input__inner {
              width: 100%;
              height: 38px;
              background: #ffffff;
              border-radius: 4px;
            }
          }
        }

        .center-display {
          margin-top: 25px;
          display: flex;
          align-items: center;

          .display-list {
            width: 50%;
            .list-download {
              width: 100%;
              height: 110px;
              object-fit: contain;
              margin-bottom: 11px;
            }

            /deep/ .el-upload--picture-card {
              width: 138px;
              height: 38px;
              line-height: 38px;
              border: none;
            }

            .display-upload {
              display: flex;
              height: 38px;
              justify-content: center;

              .list-uploading {
                width: 138px;
                height: 38px;
                background: #2588fa;
                border-radius: 4px;
                display: flex;
                align-items: center;
                justify-content: center;
                margin: 0 auto;
                cursor: pointer;

                .uploading-img {
                  width: 12px;
                  height: 12px;
                }

                .uploading-title {
                  font-family: PingFangSC, PingFang SC;
                  font-weight: 400;
                  font-size: 14px;
                  color: #ffffff;
                  margin-left: 4px;
                }
              }
            }
          }

          .display-list:last-child {
            margin-left: 24px;
          }
        }
      }

      .block-bottom {
        background: #fff;
        padding: 0 23px 23px;
        box-sizing: border-box;
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        .bottom {
          cursor: pointer;
          width: 72px;
          height: 40px;
          background: #ffffff;
          border-radius: 4px;
          border: 1px solid #dedede;
          display: flex;
          justify-content: center;
          align-items: center;

          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 14px;
          color: #949494;
        }

        .bottom:last-child {
          background: #2588fa;
          color: #ffffff;
          margin-left: 12px;
          border: 1px solid #2588fa;
        }
      }
    }
  }

  .transfer {
    /deep/ .el-dialog {
      width: 494px;
      border-radius: 6px;
    }

    /deep/ .el-dialog__body {
      padding: 0;
    }

    .transfer-block {
      background: #ffffff;

      .block-header {
        height: 48px;
        border-radius: 10px 10px 0px 0px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: #f8f8f8;

        .header-title {
          font-family: PingFangSC, PingFang SC;
          font-weight: 600;
          font-size: 16px;
          color: #292929;
        }

        .header-close {
          position: absolute;
          right: 20px;
          width: 14px;
          height: 14px;
          cursor: pointer;
          margin-top: 5px;
        }
      }

      .block-center {
        margin-top: 20px;
        padding: 0 23px;
        box-sizing: border-box;

        .center-list {
          display: flex;
          align-items: center;
          height: 38px;
          margin-bottom: 12px;

          .list-left {
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 14px;
            color: #555555;
            width: 20%;
            text-align: right;
            margin-right: 2%;
          }

          .list-right {
            width: 78%;

            /deep/ .el-input__inner {
              width: 100%;
              height: 38px;
              background: #ffffff;
              border-radius: 4px;
            }

            /deep/ .el-select {
              width: 100%;
            }
          }
        }
      }

      .block-bottom {
        padding: 0 23px 20px;
        box-sizing: border-box;
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        .bottom {
          cursor: pointer;
          width: 72px;
          height: 40px;
          background: #ffffff;
          border-radius: 4px;
          border: 1px solid #dedede;
          display: flex;
          justify-content: center;
          align-items: center;

          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 14px;
          color: #949494;
        }

        .bottom:last-child {
          background: #2588fa;
          color: #ffffff;
          margin-left: 12px;
          border: 1px solid #2588fa;
        }
      }

      .block-checkout {
        padding: 0 23px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        margin-top: 15px;
        cursor: pointer;
        justify-content: flex-end;

        .checkout-img {
          width: 12px;
          height: 12px;
          margin-right: 4px;
        }

        .checkout-title {
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          font-size: 12px;
          color: #a3a3a3;
        }
      }
    }
  }
}
</style>
